<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/10/30
 * Time: 10:41
 */

namespace app\pipeline\validate;


use think\Validate;

class Business extends Validate
{
    // 定义验证规则
    protected $rule = [
        'company_id|业务所属公司' => 'require',
        'title|业务名称' => 'require',
        'equipment_number|设备编号' => 'require',
        'pipeline_company|管道所属公司'=>'require',
        'pipeline_number|管道编号' => 'require',
        '__token__'    => 'require|token',
    ];

    // 定义验证提示
    protected $message = [
        'company_id.require' => '所属公司不能为空',
        'title.require' => '业务名称不能为空',
        'equipment_number.require'    => '设备编号不能为空',
        'pipeline_company.require'=>'管道所属公司',
        'pipeline_number.require'     => '管道编号不能为空',
        '__token__.token'  => '令牌数据无效，请刷新页面',
    ];

}